package com.xl.adminserver.v2.clients;

import com.google.common.collect.Lists;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class ITestClientFallbackFactory implements FallbackFactory {
    @Override
    public Object create(Throwable throwable) {
        return new ITestClient() {

            @Override
            public List<String> getList(String pileNo) {
                List<String> list = Lists.newArrayList();
                list.add("this is a error");
                return list;
            }
        };
    }
}
